from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription,DeclareLaunchArgument
from launch_ros.actions import Node, LifecycleNode
import launch_ros.actions
from launch.launch_description_sources import PythonLaunchDescriptionSource
from ament_index_python.packages import get_package_share_directory
from launch.substitutions import LaunchConfiguration
import os

def generate_launch_description():
    uav_tf_node = Node(
        package="sls_uav_tf",
        # namespace="uav",
        executable="uav_tf_node",
        name="uav_tf_node",
    ),
    # launch_ros.actions.Node(
    #     package='sls_controller',
    #     executable='sls_mainController',
    #     name='sls_controller',
    #     output='screen',
    #     parameters=[{
    #         "vehicleID":"uav1",
    #         "simulation_mode":False,
    #         "local_host_mode":False,
    #         "reconnect_max":3
    #         }]
    #     ),
    camera_node = launch_ros.actions.Node(
        package='sls_camera',
        executable='merge_node',
        name='sls_camera'),
    laser_node = launch_ros.actions.Node(
        package='sls_laserdis',
        executable='dist_measure_node',
        name='dist_measure_node',
        parameters=[{
            "port_name":"/dev/ttyACM1",
            }]
        )
    return LaunchDescription([
        camera_node,
        laser_node,
        uav_tf_node
    ])
